package com.ysd.lis.controller.bac;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.bac.BacDrugResultTempdetail;
import com.ysd.lis.service.bac.BacDrugResultTempdetailService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author cfz
 * @since 2024-03-28
 */
@RestController
@RequestMapping("/api/bac/bac-drug-result-tempdetail")
public class BacDrugResultTempdetailController extends BaseController {
    @Autowired
    BacDrugResultTempdetailService bacDrugResultTempdetailService;

    @ApiOperation("查询")
    @GetMapping("/findBacDrugResultTempdetailList")
    public Result findBacDrugResultTempdetailList(BacDrugResultTempdetail bacDrugResultTempdetail) {
        return bacDrugResultTempdetailService.findBacDrugResultTempdetailList(bacDrugResultTempdetail);
    }

    @ApiOperation("增加")
    @PostMapping("/addBacDrugResultTempdetail")
    public Result addBacDrugResultTempdetail(@RequestBody BacDrugResultTempdetail bacDrugResultTempdetail) {
        return bacDrugResultTempdetailService.addBacDrugResultTempdetail(bacDrugResultTempdetail);
    }

    @ApiOperation("删除")
    @PostMapping("/deleteBacDrugResultTempdetail")
    public Result deleteBacDrugResultTempdetail(@RequestBody BacDrugResultTempdetail bacDrugResultTempdetail) {
        return bacDrugResultTempdetailService.deleteBacDrugResultTempdetail(bacDrugResultTempdetail);
    }

    @ApiOperation("修改")
    @PostMapping("/updateBacDrugResultTempdetail")
    public Result updateBacDrugResultTempdetail(@RequestBody BacDrugResultTempdetail bacDrugResultTempdetail) {
        return bacDrugResultTempdetailService.updateBacDrugResultTempdetail(bacDrugResultTempdetail);
    }

    @ApiOperation("批量修改")
    @PostMapping("/batchSaveBacDrugResultTempdetail")
    public Result BatchSaveBacDrugResultTempdetail(@RequestBody List<BacDrugResultTempdetail> bacDrugResultTempdetails) {
        return bacDrugResultTempdetailService.BatchSaveBacDrugResultTempdetail(bacDrugResultTempdetails);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteBacDrugResultTempdetail")
    public Result BatchDeleteBacDrugResultTempdetail(@RequestBody List<BacDrugResultTempdetail> bacDrugResultTempdetails) {
        return bacDrugResultTempdetailService.BatchDeleteBacDrugResultTempdetail(bacDrugResultTempdetails);
    }
}
